package com.neusoft.elm.controller;

import com.neusoft.elm.po.Business;
import com.neusoft.elm.service.BusinessService;
import com.neusoft.elm.service.impl.BusinessServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public class BusinessController {
    BusinessService businessService=new BusinessServiceImpl();
    public Object listBusinessByOrderTypeId(HttpServletRequest request) throws Exception {

            Integer orderTypeId=Integer.valueOf(request.getParameter("orderTypeId"));

            List<Business> businessList = businessService.listBusinessByOrderTypeId(orderTypeId);
            return businessList;

    }
    public Object getBusinessById(HttpServletRequest request)throws Exception{
        Integer businessId=Integer.valueOf(request.getParameter("businessId"));
        Business business=businessService.getBusinessById(businessId);
        return business;
    }


}
